package com.example.boot_6.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class User {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String name;

    @JsonIgnore
    private String pwd;

    @JsonFormat(pattern = "y:M:d", locale = "zh", timezone = "GMT+8")
    private Date date;

    private Integer age;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String desc;

}
